home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-05 | 2.6 KB | 93 lines | [TEXT/MPS ] |
- #
- # File: multiVUfront
- #
- # Contains: This script can be used to create the command line for executing
- # VU, interactively (via Commando) for multiple targets/scripts.
- # The important thing about this script is that it preprocesses the
- # script files using the C preprocessor(so as to facilitate the use of
- # '#include "filename"' directives in the script). The preprocessed output
- # (which is generated by "C -e script.vu" command) is saved in a file
- # whose name is same as the script file, with an additional extension '.cpp'
- # These preprocessed files are the ones used as script files in the commandline
- # generated.
- # Output: This script will generate two different command lines. First, to be used
- # for executing the preprocessed VU script files. Second, to be used to
- # delete the preprocessed files created by this script, after the execution of
- # the VU scripts are done.
- #
- # Note: Since the VU tool is going to execute the preprocessed files, errors
- # reported, if any, will indicate line numbers corresponding to this file,
- # which will be different from those in your original VU script files.
- #
- # Prerequisite: This script makes use of the script called 'cpp_vu'. You should have that
- # script to be able to run this one.
- #
- # Written by: P Nagarajan
- #
- # Copyright: © 1989 by Apple Computer, Inc., all rights reserved.
- #
- # Change History:
- #
- # 6/5/89 naga creation
- #
- # To Do:
- #
- set exit 0
- set newcommand 'VU '
- set deletefiles 'Delete -p '
- set total_targets "`request "how many targets do you plan to run against?"`"
- exit 1 if {total_targets} > 12
- exit 1 if {total_targets} < 1
- set target_num 1
- loop
- Break if {target_num} > {total_targets}
- set str "`commando VU`"
- set skip 1
- for item in {str}
- if {skip}
- set skip 0
- continue
- end
- if {script_found}
- set result "`cpp_vu "{item}"`"
- set newcommand "{newcommand} ∂'{result}∂'"
- set deletefiles "{deletefiles} ∂'{result}∂'"
- set script_found 0
- continue
- end #if script name
- if "{item}" =~ /-(≈)®1/
- if "{item}" == "-s"
- set script_found 1
- end #if '-s'
- set newcommand "{newcommand} -{®1}{target_num}"
- else
- set newcommand "{newcommand} ∂'{item}∂'"
- end #if
- end #for
- evaluate target_num = {target_num} + 1
- end #loop
- set skip 1
- set arg_seen 0
- for item in {newcommand}
- if {skip}
- echo -n "{item}"
- set skip 0
- continue
- end
- if "{item}" =~ /-(≈)/
- if {arg_seen}
- echo -n " ∂∂∂n"
- set delta 1
- end
- echo -n "∂t{item}"
- set arg_seen 1
- else
- set arg_seen 0
- echo -n "∂t∂'{item}∂' ∂∂∂n"
- set delta 1
- end #if
- end #for
- if {delta}
- replace \∂∂\ '' "{active}"
- end
- echo "{deletefiles}"